package com.jml.HashMap.ExtHashMap;

public class Node<K,V> implements Entry<K,V> {

	//存放的map集合key
	private K key;
	private V value;
	private Node<K,V> next;

	public Node() {
	}

	public Node(K key, V value, Node<K, V> next) {
		this.key = key;
		this.value = value;
		this.next = next;
	}


	@Override
	public K getKey() {
		return this.key;
	}

	@Override
	public V getValue() {
		return this.value;
	}

	@Override
	public V setValue(V value) {
		V oldValue = this.value;
		this.value = value;
		return oldValue;
	}

	public void setKey(K key) {
		this.key = key;
	}

	public Node<K, V> getNext() {
		return next;
	}

	public void setNext(Node<K, V> next) {
		this.next = next;
	}
}
